<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Document</title>
   <style>
      .box {
         width: 1400px;
         height: 600px;
         margin: 100px auto;
         background-color: pink;
      }

      .box::before,
      .box::after {
         width: 50%;
         height: 600px;
         text-align: center;
         line-height: 600px;
         font-size: 80px;
         font-weight: 700;
         color: #ffffff;
         transition: all 1s;
      }

      .box::before {
         content: 'left';
         float: left;
         background-color: #4bacc6;
      }

      .box::after {
         content: 'right';
         float: right;
         background-color: #f79646;
      }

      .box:hover::before {
         transform: translateX(-50%);
      }

      .box:hover::after {
         transform: translateX(50%);
      }
   </style>
</head>

<body>
   <div class="box">

   </div>
</body>

</html>